package edu.suda.LoopCodePlus.entity;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/***********
 * 用户类
 * @author 树树皆秋色
 */
@AllArgsConstructor
@Data
@NoArgsConstructor
@Builder
public class User {
    private Integer userId;  //id
    @Email(message = "邮箱不符合规范")
    private String regMail; //注册邮箱
    @NotNull(message = "昵称不能为空")
    @Length(min = 1,max = 10,message = "昵称长度不能超过10,最少为1")
    private String nickName; //昵称
    @NotNull(message = "密码不能为空")
    @Length(min = 6,max = 20,message = "密码长度不能超过20,最少为6")
    private String passwd; //密码
    private String role="0"; //角色,是否是vip
    private String avatar="";
    private Date regTime=new Date(); //注册时间
    private String avatarFrame=""; //头像框
    private Integer point=0; //积分，用于商店购买
    private String title=""; //称号
    private Boolean isRead=false; //是否已读信息
    private Integer status=0; /** 状态* 0 离线* 1 在线* 2 匹配中* 3 忙碌*/
}
